package org.hwadee.entity;

import org.springframework.stereotype.Component;

@Component
public class Interest {
    /* 关注Id */
    private Integer interestId;
    /* 关注者 */
    private Integer followerId;
    /* 被关注者 */
    private Integer followedId;

    /*非数据库属性*/
    private User followerUser;
    private User followedUser;
    //是否互关
    private int isDouble;
    //最近一次发送的消息
    private Message message;

    public Message getMessage() {
        return message;
    }

    public void setMessage(Message message) {
        this.message = message;
    }

    public int getIsDouble() {
        return isDouble;
    }

    public void setIsDouble(int isDouble) {
        this.isDouble = isDouble;
    }

    public User getFollowerUser() {
        return followerUser;
    }

    public void setFollowerUser(User followerUser) {
        this.followerUser = followerUser;
    }

    public User getFollowedUser() {
        return followedUser;
    }

    public void setFollowedUser(User followedUser) {
        this.followedUser = followedUser;
    }

    public Interest() {
    }

    public Interest(Integer interestId, Integer followerId, Integer followedId) {
        this.interestId = interestId;
        this.followerId = followerId;
        this.followedId = followedId;
    }

    public Integer getInterestId() {
        return interestId;
    }

    public void setInterestId(Integer interestId) {
        this.interestId = interestId;
    }

    public Integer getFollowerId() {
        return followerId;
    }

    public void setFollowerId(Integer followerId) {
        this.followerId = followerId;
    }

    public Integer getFollowedId() {
        return followedId;
    }

    public void setFollowedId(Integer followedId) {
        this.followedId = followedId;
    }

    @Override
    public String toString() {
        return "Interest{" +
                "interestId=" + interestId +
                ", followerId=" + followerId +
                ", followedId=" + followedId +
                '}';
    }
}
